/*
  Name: DeadProxySocketInfoHandler.h
  Copyright:
  Author: Carl Chatfield
  Date: 18/01/08 17:30
  Description: Used for matching SOCKETs to client numbers
*/



#ifndef __DEADPROXYSOCKETINFOHANDLER_h__
#define __DEADPROXYSOCKETINFOHANDLER_h__

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include <wx/wx.h>
#else
	#include <wx/wxprec.h>
#endif


#include "windows.h"
#include "winsock.h"

class SocketInfo
{
    public:
        SOCKET Socket;
        int ClientNumber;
};
        

WX_DECLARE_OBJARRAY(SocketInfo, ArrayOfSocketInfos);

class SocketInfoHandler
{
    private:
        ArrayOfSocketInfos * SocketInfos;
        wxMutex * mutex;
	public:
        void AddSocketInfo(SOCKET s, int c);
        void RemoveSocketInfo(SOCKET s);
        int GetClient(SOCKET s);
        SocketInfoHandler();
};

#endif
